package models;

import javax.persistence.Embeddable;

@Embeddable
public class ServerModelId {

    public long id;

    public long userId;

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + (int) (id ^ (id >>> 32));
        result = prime * result + (int) (userId ^ (userId >>> 32));
        return result;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        ServerModelId other = (ServerModelId) obj;
        if (id != other.id)
            return false;
        if (userId != other.userId)
            return false;
        return true;
    }

}
